// TestOriginalPropertySet.cpp: implementation of the TestOriginalPropertySet class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "TestOriginalPropertySet.h"
#include "OriginalPropertySet.h"
#include "PropertyFactory.h"
#include "PropertyStack.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

using namespace PropertySystem;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPPUNIT_TEST_SUITE_REGISTRATION( TestOriginalPropertySet );
TestOriginalPropertySet::TestOriginalPropertySet()
{

}

TestOriginalPropertySet::~TestOriginalPropertySet()
{

}

void TestOriginalPropertySet::TestOriginalSet()
{
	OriginalPropertySet OriginalSet;

	CPPUNIT_ASSERT(OriginalSet.GetOriginalPropertySet(_T("D1"), _T("Part_Property"), _T("NWEPDI.mdb")));
}

void TestOriginalPropertySet::TestOriginalProperty()
{
	OriginalPropertySet OriginalSet;

	CPPUNIT_ASSERT(OriginalSet.GetOriginalPropertySet(_T("D1"), _T("Part_Property"), _T("NWEPDI.mdb")));

	OriginalProperty *pProperty = NULL;
	pProperty = OriginalSet.GetFirst();
	while(pProperty != NULL)
	{
		pProperty = OriginalSet.GetNext();
	}
	CPPUNIT_ASSERT(TRUE);
}

void TestOriginalPropertySet::TestPropertyStack()
{
	PropertyStack stack;
	stack = PropertyFactory::Instance().GetProperty(_T("D1"), _T("NWEPDI"));
	stack.RemoveAll();
}